package org.example.server.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.common.result.Result;
import org.example.dto.ScheduleDTO;
import org.example.server.service.ScheduleService;
import org.example.vo.ScheduleVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("api/v1/register/schedule")
public class ScheduleController {


    @Resource
    private ScheduleService scheduleService;

    @PostMapping("/list")
    private Result<ScheduleVO> getScheduleList(@RequestBody ScheduleDTO scheduleDTO) {
        log.info("医生排班列表查询");
        ScheduleVO scheduleVO = scheduleService.getScheduleList(scheduleDTO);
        return Result.success(scheduleVO);
    }
}
